const team = require("../database/team");

module.exports = async (req,res)=>{
  const tCode = req.query.tCode;

  const obj = {};
  if(tCode) obj.tCode = tCode-0;

  const teamData = await team.find(obj, {_id:0,__v:0});
  
  res.send({
    code: 1,
    message:"部门信息获取成功",
    data: teamData
  })
}